Setting the Config
The config file, fValidate.config.js, contains many settings that determine how fValidate operates and behaves.
Config item | Type | Default value | Description |
---|---|---|---|
Config item | Type | Default value | Description |
this.code | String | alt | This is the HTML attribute fValidate will look for to identify fValidate validation codes. |
this.esmg | String | emsg | The HTML attribute specified by this value can be used to override fValidate's built-in error messages. More details here. |
this.pattern | String | pattern | The HTML attribute specified by this value is used explicitly by the custom validator. |
this.errorClass | String | errHilite | The CSS class name to be applied to label and/or input elements when an error occurs. |
this.useSingleClassNames | Boolean | false | This flag tells fValidate to use only single CSS class names (replaces existing with errorClass) instead of multiple class names (appending errorClass to existing class name), which is the default. |
this.clearEvent | Mixed | change | This event will clear any visible error notification upon it's firing from the element of focus. Possible values are 'change', 'blur', or null. |
this.confirmMsg | String | Your data is about to be sent.\nPlease click 'Ok' to proceed or 'Cancel' to abort. | This message will be displayed as a confirmation to the user that they wish to send the data. More details here. |
this.confirmAbortMsg | String | Submission cancelled. Data has not been sent. | If the users cancels the above alert, this follow-up message will be alerted. Setting this to an empty string ('') will skip this alert. |
this.submitButton | Mixed | Submit | If you have setup fValidate to disable the submit button(s), the name of that submit button must be entered here. If you have more than one submit button, enter an array of their names. Example:
this.submitButton = new Array( 'Submit_Preview', 'Submit_Commit' ); |
this.resetButton | String | Reset | If you have setup fValidate to disable the reset button, the name of that reset button must be entered here. |
this.ccType | String | Credit_Card_Type | If you are using the cc validation type (credit cards), then you'll need to set this value. The name of the select element that contains the type of credit card used must be entered here.
Note - This element must be in the same form as the element that will hold the credit card number. |
this.ccTypeObj | String | form1.Credit_Card_Type | The full DOM name of the select element used to determine the credit card type.
Note - The config value below exists for backwards compatibility with fValidate 3.55b. If you have a newer version, use the above "ccType" instead. |
this.boxError | String | errors | If you choose to use the box error mode, you must insert the ID of the element used by that mode here. |
this.boxErrorPrefix | String | fv_error_ | Each error notice added when using the box error-mode recieves an ID. Those ID's are prefixed by this value. I placed it in the config in the event that it causes a conflict with something you already have, however unlikely. This will rarely, if ever, need to be changed. |